package com.guo.hui.service.impl;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.guo.hui.dao.blog.TpDictMapper;
import com.guo.hui.model.blog.TpDict;
import com.guo.hui.service.DictService;

@Service("dictService")
public class DictServiceImpl implements DictService {

	@Autowired
	private TpDictMapper dictDao;

	@Override
	public void saveDict(TpDict tp) {
		tp.setModifyDate(new Date());
		dictDao.insert(tp);

	}

	@Override
	public void updateDict(TpDict tp) {
		tp.setModifyDate(new Date());
		dictDao.update(tp);
	}

	@Override
	public List<TpDict> selectByMap(Map<String, Object> map) {
		List<TpDict> list = dictDao.selectByMap(map);
		return list;
	}

}
